<template>
  <div>
      <div class="foot" >
      <div v-for="(item, index) in arr" :key="index" @click="getGo(item, index)" :class="{ red: isactive2 == index }">
      <div>{{item.desc}}</div>
      <!-- <div>我的</div> --></div>
    </div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            isactive2:"1",
            arr:[
                {desc:"试用中心",code:"0"},
                 {desc:"试用报告",code:"1"},
                  {desc:"我的",code:"2"},
            ],
        }
    },
    methods:{
        getGo(item, index){
             this.isactive2 = index;
             if( this.isactive2=="0"){
                this.$router.push('/useCenter')
             }else if(this.isactive2=="2"){
               this.$router.push('/My')
             }
            
        }
    },
}
</script>

<style scoped>
.foot {
  width: 100%;
  height: 1.5rem;
  display: flex;
  justify-content: space-between;
  line-height: 1.5rem;
  padding: 0px 1rem;
  box-sizing: border-box;
  position: fixed;
  bottom: 0;
  background-color: rgb(255,255,255);
  
}
.foot div{
  font-size: 0.25rem;
}
.red{
    color: red;
}
</style>